<template lang="html">
  <form action="/shortmes" method="post">
    <textarea type="text" name="content" v-model="content" value="" maxlength="100" placeholder="分享新鲜事儿（100字以内）"></textarea>
    <button @click="create()">留言</button>
  </form>
</template>

<script>
  import axios from '~/plugins/axios'

  export default {
    data(){
      return {
        content:""
      }
    },
    methods:{
      async create(){
        this.$emit("create",this.content);
        this.content = "";

      }
    }
  }
</script>

<style lang="css" scoped>
  form > textarea {
    width: 98%;
    padding: 0px;
    border: 8px solid silver;
    display: block;
    height: 40pt;
    height: 100pt;
    font-size: 28pt;
    background-color: transparent;
  }
  form > button {
    font-size: 28pt;
    float:right;
    margin: 0px 4px;
  }
</style>
